<template>
	<view :style="{'height':minH}">
		<view class="info" :style="{'height':(winH-80)+'px'}">
			<view v-for="(item,index) in 50" :key="index">
				条款
			</view>
		</view>
		
		<view class="info-btn">
			<view class="btn-box">
				<button type="default" @click="goBack()" class="wss-btn">关闭</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				winH: 0,
			}
		},
		onLoad(option) {
			this.initH();
		},
		computed: {
			minH: function(){
				return this.winH+"px"
			}
		},
		methods: {
			initH () {
				let _self = this
				uni.getSystemInfo({
				    success: function (res) {
						_self.winH = res.windowHeight
						console.log(_self.winH)
				    }
				});
			},
			goBack() {
				uni.navigateBack({
					
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.info {
		padding: 20rpx 40rpx 120rpx 40rpx;
		overflow-y: auto;
		background-color: #ffffff;
	}
	.info-btn {
		position: absolute;
		bottom: 0;
		width: 100%;
		background-color: #ffffff;
		.btn-box {
			padding: 20rpx 40rpx;
			button {
				width: 100%;
				background-color: black;
				color: #ffff;
				font-size: 30rpx;
			}
		}
	}
</style>
